home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pru_wallbreak.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  87 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # PRU_wallbreak.cog    Boulder smashes through wall, opening an exit for Indy.
  5. #
  6. # [GGJ]
  7. #
  8. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  9. #
  10. # ========================================================================================
  11. symbols
  12.  
  13. message        user0
  14. message        arrived
  15.  
  16. thing        block0            #top block on upstream side
  17. thing        block1            #upper middle block on upstream side
  18. thing        block2            #upper middle block on upstream side
  19. thing        block3            #bottom block on upstream side
  20. thing        block4            #downstream side, top
  21. thing        block5            #downstream side, upper middle
  22. thing        block6            #downstream side, lower middle
  23. thing        block7            #downstream side, bottom
  24.  
  25. thing        boulder
  26.  
  27. thing        ghost
  28. thing        BldrGhost0
  29. thing        BldrGhost1
  30. thing        BldrGhost2
  31. thing        BldrGhost3
  32. thing        BldrGhost4
  33.  
  34. template    debris0=stoneshrapa    local
  35. template    debris1=stoneshrapb    local
  36. template    debris2=stoneshrapc    local
  37.  
  38. sound        tumble=pru_boulder_wallcrash_c.wav    local
  39.  
  40. int            fragment    local
  41. int            i            local
  42. int            nPos=0        local
  43.  
  44. flex        crashSpeed0=4    local
  45. flex        crashSpeed1=3    local
  46. flex        crashSpeed2=2    local
  47. flex        crashSpeed3=2    local
  48. flex        crashSpeed4=2    local
  49.  
  50. end
  51. # ========================================================================================
  52. code
  53.  
  54. user0:
  55.     Print("entered");
  56.     
  57.     DestroyThing(block0);
  58.     DestroyThing(block1);
  59.     DestroyThing(block2);
  60.     DestroyThing(block3);
  61.     DestroyThing(block4);
  62.     DestroyThing(block5);
  63.     DestroyThing(block6);
  64.     DestroyThing(block7);
  65.     
  66.     PlaySoundLocal(tumble, 1.0, 0.0, 0x0, 0);
  67.     for(i=0; i<40; i=i+1)                                                                        
  68.     {
  69.         fragment = CreateThing(debris0[3.0 * rand()], ghost);
  70.         SetThingVel(fragment, VectorScale(VectorAdd(RandVec(), '-0.5 -0.5 0.05'), 2.0));
  71.         SetThingRotVel(fragment, VectorScale(VectorAdd(RandVec(), '0.0 0.0 0.0'), 900.0));                    
  72.     }
  73.     
  74.     MoveThingToPos(Boulder, GetThingPos(BldrGhost0), crashSpeed0);
  75.     return;
  76.     
  77. arrived:
  78.     if(nPos < 4)
  79.     {
  80.         nPos = nPos + 1;
  81.         MoveThingToPos(Boulder, GetThingPos(BldrGhost0[nPos]), crashSpeed0[nPos]);
  82.     }
  83.     return;
  84. # .................................................................................    
  85. end
  86.  
  87.